# !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Time        : 2021/9/25 18:39
@Author      : Albert Darren
@Contact     : 2563491540@qq.com
@File        : support_vector_classifier.py
@Version     : Version 1.0.0
@Description : TODO
@Created By  : PyCharm
"""
from PIL import Image
import matplotlib.pyplot as plt
from matplotlib import font_manager

fpath = 'C:/Windows/Fonts/simsun.ttc'
my_font = font_manager.FontProperties(fname=fpath)
im = Image.open(fp="./../experiment_fig/sakura.jpg")  # (1600,1200)
crop_im = im.crop((400, 600, 800, 900))
resize_crop_im = crop_im.resize((crop_im.width * 2, crop_im.height * 2),
                                resample=Image.BICUBIC)
im.paste(resize_crop_im, box=(0, 0))
plt.title("图中图小图放大2倍", fontproperties=my_font)
plt.imshow(im)
plt.show()
